// pages/submitOrder/submitOrder.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    show: false,
    showModel:true,
    animationData:{},
    animationBox:{},
    height:0,
    height2:0
  },
  showPopup() {
    this.setData({ show: true });
  },

  onClose() {
    this.setData({ show: false });
  },
  //立即支付
  showModel (){
    var animation = wx.createAnimation({
      duration: 300,
      timingFunction: 'ease',
    })

    this.animationData = animation

    animation.height('40%').step()
    var animation2 = wx.createAnimation({
      duration: 300,
      timingFunction: 'ease',
    })
    this.animationBox = animation2
    animation2.height("60%").step()
    this.setData({
      showModel: false,
      animationData: animation.export(),
      animationBox: animation2.export()
    })
  },
  closeModel (){
    var animation = wx.createAnimation({
      duration: 300,
      timingFunction: 'ease',
    })

    this.animationData = animation

    animation.height(0).step()
    var animation2 = wx.createAnimation({
      duration: 300,
      timingFunction: 'ease',
    })
    this.animationBox = animation2
    animation2.height(0).step()
    this.setData({
      showModel: false,
      animationData: animation.export(),
      animationBox: animation2.export()
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
   
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})